// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_PROD_WORKING_REPORT
// * CreateDate    : 2011-10-30 16:11:08
// * Creater       : CodeSmith
// * LastChangeDate: 2011-10-30 16:11:08
// * LastChanger   : 2011-10-30 16:11:08
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
    [Serializable]
    public partial class ProdWorkingReportEntity : EntityBase
    {
        public ProdWorkingReportTable TableSchema
        {
            get
            {
                return ProdWorkingReportTable.Current;
            }
        }

        public ProdWorkingReportEntity()
        {

        }

        public ProdWorkingReportEntity(DataRow dr)
        {
            if (dr == null)
            {
                return;
            }
            this.ReportId = Convert.ToString(CommonFunctions.ToObject(dr["REPORT_ID"]));
            this.ProductTechnicId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_TECHNIC_ID"]));
            this.ReportPerson = Convert.ToString(CommonFunctions.ToObject(dr["REPORT_PERSON"]));
            this.ReportDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["REPORT_DATE"]));
            this.StartDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["START_DATE"]));
            this.FinishDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["FINISH_DATE"]));
            this.ReportQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["REPORT_QTY"]));
            this.ActualSize = Convert.ToDecimal(CommonFunctions.ToObject(dr["ACTUAL_SIZE"]));
            this.StandardSize = Convert.ToDecimal(CommonFunctions.ToObject(dr["STANDARD_SIZE"]));
            this.CheckSize = Convert.ToDecimal(CommonFunctions.ToObject(dr["CHECK_SIZE"]));
            this.CreateDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATE_DATE"]));
            this.CreateBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATE_BY"]));
            this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }

        public ProdWorkingReportEntity(DataRowView dr)
        {
            if (dr == null)
            {
                return;
            }
            this.ReportId = Convert.ToString(CommonFunctions.ToObject(dr["REPORT_ID"]));
            this.ProductTechnicId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_TECHNIC_ID"]));
            this.ReportPerson = Convert.ToString(CommonFunctions.ToObject(dr["REPORT_PERSON"]));
            this.ReportDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["REPORT_DATE"]));
            this.StartDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["START_DATE"]));
            this.FinishDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["FINISH_DATE"]));
            this.ReportQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["REPORT_QTY"]));
            this.ActualSize = Convert.ToDecimal(CommonFunctions.ToObject(dr["ACTUAL_SIZE"]));
            this.StandardSize = Convert.ToDecimal(CommonFunctions.ToObject(dr["STANDARD_SIZE"]));
            this.CheckSize = Convert.ToDecimal(CommonFunctions.ToObject(dr["CHECK_SIZE"]));
            this.CreateDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATE_DATE"]));
            this.CreateBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATE_BY"]));
            this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return ProdWorkingReportTable.Current;
            }
        }

        #region Perporty List
        public string ReportId
        {
            get { return Convert.ToString(GetData(ProdWorkingReportTable.C_REPORT_ID)); }
            set { SetData(ProdWorkingReportTable.C_REPORT_ID, value); }
        }

        public string ProductTechnicId
        {
            get { return Convert.ToString(GetData(ProdWorkingReportTable.C_PRODUCT_TECHNIC_ID)); }
            set { SetData(ProdWorkingReportTable.C_PRODUCT_TECHNIC_ID, value); }
        }

        public string ReportPerson
        {
            get { return Convert.ToString(GetData(ProdWorkingReportTable.C_REPORT_PERSON)); }
            set { SetData(ProdWorkingReportTable.C_REPORT_PERSON, value); }
        }

        public DateTime ReportDate
        {
            get { return Convert.ToDateTime(GetData(ProdWorkingReportTable.C_REPORT_DATE)); }
            set { SetData(ProdWorkingReportTable.C_REPORT_DATE, value); }
        }

        public DateTime StartDate
        {
            get { return Convert.ToDateTime(GetData(ProdWorkingReportTable.C_START_DATE)); }
            set { SetData(ProdWorkingReportTable.C_START_DATE, value); }
        }

        public DateTime FinishDate
        {
            get { return Convert.ToDateTime(GetData(ProdWorkingReportTable.C_FINISH_DATE)); }
            set { SetData(ProdWorkingReportTable.C_FINISH_DATE, value); }
        }

        public decimal ReportQty
        {
            get { return Convert.ToDecimal(GetData(ProdWorkingReportTable.C_REPORT_QTY)); }
            set { SetData(ProdWorkingReportTable.C_REPORT_QTY, value); }
        }

        public decimal ActualSize
        {
            get { return Convert.ToDecimal(GetData(ProdWorkingReportTable.C_ACTUAL_SIZE)); }
            set { SetData(ProdWorkingReportTable.C_ACTUAL_SIZE, value); }
        }

        public decimal StandardSize
        {
            get { return Convert.ToDecimal(GetData(ProdWorkingReportTable.C_STANDARD_SIZE)); }
            set { SetData(ProdWorkingReportTable.C_STANDARD_SIZE, value); }
        }

        public decimal CheckSize
        {
            get { return Convert.ToDecimal(GetData(ProdWorkingReportTable.C_CHECK_SIZE)); }
            set { SetData(ProdWorkingReportTable.C_CHECK_SIZE, value); }
        }

        public DateTime CreateDate
        {
            get { return Convert.ToDateTime(GetData(ProdWorkingReportTable.C_CREATE_DATE)); }
            set { SetData(ProdWorkingReportTable.C_CREATE_DATE, value); }
        }

        public string CreateBy
        {
            get { return Convert.ToString(GetData(ProdWorkingReportTable.C_CREATE_BY)); }
            set { SetData(ProdWorkingReportTable.C_CREATE_BY, value); }
        }

        public string Status
        {
            get { return Convert.ToString(GetData(ProdWorkingReportTable.C_STATUS)); }
            set { SetData(ProdWorkingReportTable.C_STATUS, value); }
        }

        public string Remark
        {
            get { return Convert.ToString(GetData(ProdWorkingReportTable.C_REMARK)); }
            set { SetData(ProdWorkingReportTable.C_REMARK, value); }
        }

        #endregion
    }


}

